<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .block{
            height:200px;
            background:red;
        }

        .inline{
            /* inline元素是不能设置高度的,除非使用了float布局 */
            display: inline;
            background: green;
            vertical-align: top;
        }

        .inline2{
            /* inline元素是不能设置高度的,除非使用了float */
            display: inline;
            background: green;
            vertical-align: bottom;
        }

        .inline-block{
            display: inline-block;
            width:200px;
            height:100px;
            background:blue;
            vertical-align: middle;
        }
    </style>
</head>
<body>
    <div class="block">
        block
    </div>
    <div class="inline">inline</div>
    <div class="inline2">inline</div>
    
    <div class="inline-block">inline-block</div>

    <div class="inline2" style="vertical-align: top;">inline</div>
</body>
</html>